let enableDebugMode = function (game, enable) {
    if (!enable) {
        return
    }
    window.paused = false
    window.addEventListener('keydown', function (event) {
        let k = event.key
        if ('123456789'.includes(k)) {
            this.level = loadLevel(Number(k))
        }
    })
    //控制速度
    document.querySelector('#id-input-speed').addEventListener('input', function (event) {
        let input = event.target
        window.fps = Number(input.value)
    })

};


const __main = function () {

    const game = GuaGame.instance(30, images, function (g) {
        let s = MainMenu.new(g)
        // let s = SceneVictoryeEnd.new(g)
        // let s = ChooseLevel.new(g)
        // let s = SceneEditor.new(g)
        // let s = SceneTitle.new(g)
        // let s = Scene.new(g)
        g.runWithScene(s)
    })
    log('game', game.scene)
    // enableDebugMode(game, true)
};

__main()